package cn.edu.scau.cmi.chenjieling.client;
import cn.edu.scau.cmi.chenjieling.interProgramming.*;


import cn.edu.scau.cmi.chenjieling.singleton.Singleton;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;;

public class InterProgrammingClient extends Application {
	public void start(Stage stage) throws Exception {
		try {
		BorderPane root = new BorderPane();
		Student graduateStudent=new GraduateStudent();
		Text t1 = new Text(graduateStudent.learning());
		t1.setFont(Font.font(20));
		
		Student undergraduateStudent=new UndergraduateStudent();
		Text t2 = new Text(undergraduateStudent.learning());
		t2.setFont(Font.font(20));
		VBox vbx = new VBox();
		vbx.getChildren().addAll(t1,t2);
		vbx.setAlignment(Pos.CENTER);
		vbx.setSpacing(20);
		
		root.setCenter(vbx);
		stage.setTitle("ex1");
		
		stage.setScene(new Scene(root,500,300));
		stage.show();
		
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	  public static void main(String[] args) {
	    Application.launch(args);
	  }
	}


/*
public class InterProgrammingClient {

	public static void main(String[] args) {
		Student graduateStudent=new GraduateStudent();
		graduateStudent.learning();
		
		Student undergraduateStudent=new UndergraduateStudent();
		undergraduateStudent.learning();
	}
}
*/